package com.gdufe.mistakebook.service;

import com.gdufe.mistakebook.entity.vo.count.CreateTimeQuestionCountVO;
import com.gdufe.mistakebook.entity.vo.count.LabelQuestionCountVO;
import com.gdufe.mistakebook.entity.vo.count.PriorityQuestionCountVO;
import com.gdufe.mistakebook.entity.vo.count.SubjectQuestionCountVO;
import com.gdufe.mistakebook.entity.dto.QueryQuestionsDto;
import com.gdufe.mistakebook.entity.dto.QuestionDTO;
import com.gdufe.mistakebook.entity.vo.QueryQuestionsVo;
import com.gdufe.mistakebook.entity.vo.QuestionVO;
import com.gdufe.mistakebook.result.PageResult;

import java.util.List;

/**
 * @author lzh
 */
public interface QuestionService {

    /**
     * 条件分页查询
     *
     * @param queryQuestionsDto
     * @return
     */
    PageResult pageQuestions(QueryQuestionsDto queryQuestionsDto);


    /**
     * 添加错题
     *
     * @param questionDto
     */
    void insertQuestionWithLabel(QuestionDTO questionDto);

    /**
     * 随机查询错题
     *
     * @param count
     * @return
     */
    List<QueryQuestionsVo> randomQuestions(Integer count);

    /**
     * 修改错题信息 以及标签表信息
     *
     * @param questionDto
     */
    void updateQuestionWithLabel(QuestionDTO questionDto);

    /**
     * 删除错题及 标签关系
     *
     * @param status
     * @param questionId
     */
    void deleteQuestionWithLabel(Integer status, Integer questionId);

    /**
     * 根据id获取错题详情
     *
     * @param id
     * @return
     */
    QuestionVO getDetails(Integer id);

    /**
     * 统计各种学科对应的错题数量
     * @return
     */
    List<SubjectQuestionCountVO> getSubjectAmount();

    /**
     * 统计各类标签对应的错题数量
     * @return
     */
    List<LabelQuestionCountVO> getLabelAmount();

    List<PriorityQuestionCountVO> getPriorityAmount();

    List<CreateTimeQuestionCountVO> getCeateTimeAmount();
}
